/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-07-26 09:25:48
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-08-18 13:33:25
 * @FilePath: \ruoyi-ui\src\api\wechat\wxAccount.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询公众号账号列表
export function listAccount(query) {
  return request({
    url: '/wechat/wxAccount/list',
    method: 'get',
    params: query
  })
}

// 查询公众号账号详细
export function getAccount(appid) {
  return request({
    url: '/wechat/wxAccount/info/' + appid,
    method: 'get'
  })
}

// 新增公众号账号
export function addAccount(data) {
  return request({
    url: '/wechat/wxAccount/add',
    method: 'post',
    data: data
  })
}

// 修改公众号账号
export function updateAccount(data) {
  return request({
    url: '/wechat/wxAccount',
    method: 'put',
    data: data
  })
}

// 删除公众号账号
export function delAccount(appid) {
  return request({
    url: '/wechat/wxAccount/delete?appids=' + appid,
    method: 'delete'
  })
}
